package com.woniuxy.yoga.business.client;


import com.woniuxy.yoga.business.model.dto.course.OrdinaryCourseDTO;
import com.woniuxy.yoga.business.model.form.course.AmountAloneCourseDurationForm;
import com.woniuxy.yoga.business.model.form.course.AmountOrdinaryCourseDurationForm;
import com.woniuxy.yoga.business.model.form.course.AmountTeamCourseDurationForm;
import com.woniuxy.yoga.commons.core.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value="course-service",path = "/course")
public interface CourseClient {

    /**
     * 统计该时间段私教课程已完成的总时长
     * @param amountAloneCourseDurationForm
     * @return
     */
    @PostMapping("/aloneCourse/amountAloneCourseDuration")
    public Result<Integer> amountAloneCourseDuration(@RequestBody AmountAloneCourseDurationForm amountAloneCourseDurationForm);

    /**
     * 统计该时间段普通课程已完成的总时长
     * @param amountOrdinaryCourseDurationForm
     * @return
     */
    @PostMapping("/ordinaryCourse/amountOrdinaryCourseDuration")
    public Result<Integer> amountOrdinaryCourseDuration(@RequestBody AmountOrdinaryCourseDurationForm amountOrdinaryCourseDurationForm);

    /**
     * 统计该时间段的团队课程已完成的总时长
     * @param amountTeamCourseDurationForm
     * @return
     */
    @PostMapping("/teamCourse/amountTeamCourseDuration")
    public Result<Integer> amountTeamCourseDuration(@RequestBody AmountTeamCourseDurationForm amountTeamCourseDurationForm);

    /**
     * 教室ID查询普通课程
     * @param classroomId
     * @return
     */
    @GetMapping("/ordinaryCourse/getByClassroomId/{classroomId}")
    public Result<List<OrdinaryCourseDTO>> getByClassroomId(@PathVariable("classroomId") Integer classroomId);

}
